<div id="addAttendanceClassesModel" class="modal fade" role="dialog" aria-labelledby="exampleModalLabel"
     aria-hidden="true">
    <div class="modal-dialog modal-lg">
        <div class="modal-content">
            <div class="modal-body">
                <h3 class="m-t-none m-b ">添加</h3>
                <div class="ibox-content">
                    <div>
                        <div>
                            <div class="form-group row">
                                <label class="col-sm-2 col-form-label">班次名称</label>
                                <div class="col-sm-10">
                                    <input v-model="addAttendanceClassesInfo.classesName" type="text"
                                           placeholder="必填，请填写班次名称" class="form-control">
                                </div>
                            </div>
                            <div class="form-group row">
                                <label class="col-sm-2 col-form-label">打卡范围</label>
                                <div class="col-sm-10">
                                    <input v-model="addAttendanceClassesInfo.timeOffset" type="text"
                                           placeholder="必填，请填写打卡范围(分钟)" class="form-control">
                                </div>
                            </div>
                            <div class="form-group row">
                                <label class="col-sm-2 col-form-label">打卡次数</label>
                                <div class="col-sm-10">
                                    <select class="custom-select" v-model="addAttendanceClassesInfo.clockCount"
                                            @change="_addAttendanceChangeClockCount()">
                                        <option selected disabled value="">必填，请选择打卡次数</option>
                                        <option value="2">2次</option>
                                        <option value="4">4次</option>
                                        <option value="6">6次</option>
                                    </select>
                                </div>
                            </div>
                            <div v-for="(item,index) in addAttendanceClassesInfo.attrs">
                                <div class="row" v-if="index % 2 == 0">
                                    <div class="col-sm-6">
                                        <div class="form-group row">
                                            <label class="col-sm-4 col-form-label padding-lr-sm">{{item.name}}</label>
                                            <div class="col-sm-8">
                                                <input v-model="item.value" type="text"
                                                       :placeholder="'必填，请填写'+item.name" class="form-control"
                                                       :class="item.specCd">
                                            </div>
                                        </div>
                                    </div>
                                    <div class="col-sm-6" v-if="index < addAttendanceClassesInfo.attrs.length-1">
                                        <div class="form-group row">
                                            <label class="col-sm-3 col-form-label padding-lr-sm">{{addAttendanceClassesInfo.attrs[index+1].name}}</label>
                                            <div class="col-sm-9">
                                                <input v-model="addAttendanceClassesInfo.attrs[index+1].value"
                                                       type="text"
                                                       :placeholder="'必填，请填写'+addAttendanceClassesInfo.attrs[index+1].name"
                                                       class="form-control "
                                                       :class="addAttendanceClassesInfo.attrs[index+1].specCd">
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <div class="form-group row">
                                <label class="col-sm-2 col-form-label">打卡类型</label>
                                <div class="col-sm-10">
                                    <select class="custom-select" v-model="addAttendanceClassesInfo.clockType">
                                        <option selected disabled value="">必填，请选择打卡类型</option>
                                        <option v-for="(item,index) in addAttendanceClassesInfo.clockTypes" :key="index"
                                                v-bind:value="item.statusCd">
                                            {{item.name}}
                                        </option>
                                    </select>
                                </div>
                            </div>
                            <div class="form-group row" v-if="addAttendanceClassesInfo.clockType == '1003'">
                                <label class="col-sm-2 col-form-label">打卡规则</label>
                                <div class="col-sm-10">
                                    <div class="checkbox custom-control-inline">
                                        <label>
                                            <input type="checkbox" v-model="addAttendanceClassesInfo.clockTypeValues"
                                                   value="1">星期一
                                        </label>
                                    </div>
                                    <div class="checkbox custom-control-inline">
                                        <label>
                                            <input type="checkbox" v-model="addAttendanceClassesInfo.clockTypeValues"
                                                   value="2">星期二
                                        </label>
                                    </div>
                                    <div class="checkbox custom-control-inline">
                                        <label>
                                            <input type="checkbox" v-model="addAttendanceClassesInfo.clockTypeValues"
                                                   value="3">星期三
                                        </label>
                                    </div>
                                    <div class="checkbox custom-control-inline">
                                        <label>
                                            <input type="checkbox" v-model="addAttendanceClassesInfo.clockTypeValues"
                                                   value="4">星期四
                                        </label>
                                    </div>
                                    <div class="checkbox custom-control-inline">
                                        <label>
                                            <input type="checkbox" v-model="addAttendanceClassesInfo.clockTypeValues"
                                                   value="5">星期五
                                        </label>
                                    </div>
                                    <div class="checkbox custom-control-inline">
                                        <label>
                                            <input type="checkbox" v-model="addAttendanceClassesInfo.clockTypeValues"
                                                   value="6">星期六
                                        </label>
                                    </div>
                                    <div class="checkbox custom-control-inline">
                                        <label>
                                            <input type="checkbox" v-model="addAttendanceClassesInfo.clockTypeValues"
                                                   value="7">星期日
                                        </label>
                                    </div>
                                </div>
                            </div>
                            <div class="form-group row">
                                <label class="col-sm-2 col-form-label">迟到范围</label>
                                <div class="col-sm-10">
                                    <input v-model="addAttendanceClassesInfo.leaveOffset" type="text"
                                           placeholder="必填，请填写迟到范围（分钟）" class="form-control">
                                </div>
                            </div>
                            <div class="form-group row">
                                <label class="col-sm-2 col-form-label">早退范围</label>
                                <div class="col-sm-10">
                                    <input v-model="addAttendanceClassesInfo.lateOffset" type="text"
                                           placeholder="必填，请填写早退范围（分钟）" class="form-control">
                                </div>
                            </div>
                            <div class="form-group row">
                                <label class="col-sm-2 col-form-label">考勤部门</label>
                                <div class="col-sm-10">
                                    <div class="row">
                                        <div class="col-sm-6">
                                            <vc:create path="frame/orgSelect2" parentModal="addAttendanceClassesModel"
                                                       callBackListener="addAttendanceClasses" callBackFunction="notify"
                                                       namespace="addAttendanceClasses">
                                            </vc:create>
                                        </div>
                                        <div class="col-sm-6">
                                            <vc:create path="frame/departmentSelect2"
                                                       parentModal="addAttendanceClassesModel"
                                                       callBackListener="addAttendanceClasses" callBackFunction="notify"
                                                       namespace="addAttendanceClasses">
                                            </vc:create>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <div class="ibox-content">
                                <button class="btn btn-primary float-right" type="button"
                                        v-on:click="saveAttendanceClassesInfo()">
                                    <i class="fa fa-check"></i>&nbsp;保存
                                </button>
                                <button type="button" class="btn btn-warning float-right" style="margin-right:20px;"
                                        data-dismiss="modal">
                                    <i class="fa fa-close"></i>&nbsp;取消
                                </button>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>